package com.houweishi.module.clockingcount.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.houweishi.common.annotation.Excel;
import com.houweishi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * 员工打卡统计对象 biz_clocking_count
 * 
 * @author houweishi
 * @date 2023-03-04
 */
@Data
public class BizClockingCount extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增id */
    private Long id;

    /** 员工id */
//    @Excel(name = "员工id")
    private Long staffId;

    /** 员工姓名 */
    @Excel(name = "员工姓名")
    private String staffName;

    /** 今日打卡状态（0正常 1异常 2请假） */
    @Excel(name = "今日打卡状态", readConverterExp = "0=正常,1=异常,2=请假")
    private String dayClockStatus;

    /** 打卡日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "打卡日期", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate clockDate;

    /** 总计打卡天数 */
    @Excel(name = "总计打卡天数")
    private Long clockDays;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("staffId", getStaffId())
            .append("staffName", getStaffName())
            .append("dayClockStatus", getDayClockStatus())
            .append("clockDate", getClockDate())
            .append("clockDays", getClockDays())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
